package cn.tedu.micro.demo.all.controller;

import cn.tedu.micro.demo.all.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import result.JsonResult;

@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderService orderService;
    @PostMapping("/add")
    public JsonResult addOrder(String userId,String productCode,Integer count){
        orderService.addOrder(userId,productCode,count);
        return JsonResult.ok("下单成功");
    }

}
